﻿using QwLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.SCADA.ZemtDemo.MqClient.Model
{
    public class TraQ : ObservableObject
    {
        private string _Matid;
        /// <summary>
        /// 物料编号
        /// </summary>
        public string Matid
        {
            get { return _Matid; }
            set
            {
                if (value != (_Matid))
                {
                    _Matid = value;
                    OnPropertyChanged(nameof(Matid));
                }
            }
        }

        private string _Matdesc;
        /// <summary>
        /// 产品描述
        /// </summary>
        public string Matdesc
        {
            get { return _Matdesc; }
            set
            {
                if (value != (_Matdesc))
                {
                    _Matdesc = value;
                    OnPropertyChanged(nameof(Matdesc));
                }
            }
        }

        private DateTime? _StartTime;
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? StartTime
        {
            get { return _StartTime; }
            set
            {
                if (value != (_StartTime))
                {
                    _StartTime = value;
                    OnPropertyChanged(nameof(StartTime));
                }
            }
        }

        private DateTime? _EndTime;
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? EndTime
        {
            get { return _EndTime; }
            set
            {
                if (value != (_EndTime))
                {
                    _EndTime = value;
                    OnPropertyChanged(nameof(EndTime));
                }
            }
        }

        public List<QuosDetail> QuosDetails;

        public TraQ()
        {
            QuosDetails = new List<QuosDetail>();
        }

    }

    public class QuosDetail : ObservableObject
    {
        private string _DisqName;
        /// <summary>
        /// 工序名称
        /// </summary>
        public string DisqName
        {
            get { return _DisqName; }
            set
            {
                if (value != (_DisqName))
                {
                    _DisqName = value;
                    OnPropertyChanged(nameof(DisqName));
                }
            }
        }

        private string _JobSteNo;
        /// <summary>
        /// 工步号
        /// </summary>
        public string JobSteNo
        {
            get { return _JobSteNo; }
            set
            {
                if (value != (_JobSteNo))
                {
                    _JobSteNo = value;
                    OnPropertyChanged(nameof(JobSteNo));
                }
            }
        }

        private string _Detail;
        /// <summary>
        /// 详细信息
        /// </summary>
        public string Detail
        {
            get { return _Detail; }
            set
            {
                if (value != (_Detail))
                {
                    _Detail = value;
                    OnPropertyChanged(nameof(Detail));
                }
            }
        }

        private string _QualityDesc;
        /// <summary>
        /// 质量要求
        /// </summary>
        public string QualityDesc
        {
            get { return _QualityDesc; }
            set
            {
                if (value != (_QualityDesc))
                {
                    _QualityDesc = value;
                    OnPropertyChanged(nameof(QualityDesc));
                }
            }
        }

        private DateTime? _StartTime;
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? StartTime
        {
            get { return _StartTime; }
            set
            {
                if (value != (_StartTime))
                {
                    _StartTime = value;
                    OnPropertyChanged(nameof(StartTime));
                }
            }
        }

        private DateTime? _EndTime;
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? EndTime
        {
            get { return _EndTime; }
            set
            {
                if (value != (_EndTime))
                {
                    _EndTime = value;
                    OnPropertyChanged(nameof(EndTime));
                }
            }
        }

        private string _Opeartor;
        /// <summary>
        /// 自检
        /// </summary>
        public string Opeartor
        {
            get { return _Opeartor; }
            set
            {
                if (value != (_Opeartor))
                {
                    _Opeartor = value;
                    OnPropertyChanged(nameof(Opeartor));
                }
            }
        }

        private string _Checker;
        /// <summary>
        /// 互检
        /// </summary>
        public string Checker
        {
            get { return _Checker; }
            set
            {
                if (value != (_Checker))
                {
                    _Checker = value;
                    OnPropertyChanged(nameof(Checker));
                }
            }
        }

        private string _Remark;
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark
        {
            get { return _Remark; }
            set
            {
                if (value != (_Remark))
                {
                    _Remark = value;
                    OnPropertyChanged(nameof(Remark));
                }
            }
        }
    }
}
